<?php
/* 
 * Copyright (c) 2018-2021   All rights reserved.
 * 
 * 创建时间：2021-09-24 07:10
 *
 * 项目：rm  -  $  - payWidget.php
 *
 * 作者：liwei 
 */

namespace modules\levpays\modules\baidupay\widgets;

use Lev;
use lev\base\Widgetv;
use lev\helpers\UrlHelper;
use modules\levpays\modules\baidupay\baidupayHelper;

!defined('INLEV') && exit('Access Denied LEV');

class payWidget extends Widgetv
{


    public static function run($goods = [])
    {
        //parent::run($show); // TODO: Change the autogenerated stub
        return static::render(0, __DIR__ . '/views/run.php', [
            'goods' => $goods,
        ]);
    }

    public static function qrcodePaylink($tradeId) {
        return baidupayHelper::urlQrcodePay($tradeId);
    }

    /**
     * @param string $type swan-baiduboxapp baiduboxapp
     * @return string
     */
    public static function miniJs($type = 'baiduboxapp/') {
        return static::render(0, __DIR__ . '/views/load_mini_js.php', [
            'type' => $type,
        ]);
    }

}